const http = require('http');

const server = http.createServer((req, res) => {
  const { url } = req;

  if (url === '/home') {
    res.writeHead(200, { 'content-type': 'text/html' });
    res.end('<h1>Welcome to our homepage!<h1>');
  } else {
    res.end('Page not found');
  }
});

server.listen(3000, () => {
  console.log('Server is running on port 3000');
});
